package tgc.edu.demo.jkxt.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import tgc.edu.demo.jkxt.custom.BaseEntity;
import tgc.edu.demo.jkxt.entity.TbClass;

@Entity
public class Student extends SysUser{
	//姓名
	private String name;
	//身份证号
	private String IDCard;
	//性别
	private String sex;
	//手机号码
	private String MobilePhone;
	//学号
	private String stuNo;
	//班级
	private TbClass tbClass;

	

	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getIDCard() {
		return IDCard;
	}
	public void setIDCard(String iDCard) {
		IDCard = iDCard;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getMobilePhone() {
		return MobilePhone;
	}
	public void setMobilePhone(String mobilePhone) {
		MobilePhone = mobilePhone;
	}
	public String getStuNo() {
		return stuNo;
	}
	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}
	@ManyToOne
	public TbClass getTbClass() {
		return tbClass;
	}
	public void setTbClass(TbClass tbClass) {
		this.tbClass = tbClass;
	}
	@Transient
	public String getClassName() {
		return tbClass==null?"":tbClass.getName();
	}
	@Override
	public String toString() {
		return "Student [stuNo=" + stuNo + ", tbClass=" + tbClass + ", sex=" + sex + ", MobilePhone=" + MobilePhone
				+ ", IDCard=" + IDCard + "]";
	}
	
}
